package cn.happyjava.springbootsecurity.repository;

import cn.happyjava.springbootsecurity.pojo.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Repository;

/**
 * @Author: zlxiao
 * @Date: 2019/9/3 12:51
 */
@Repository
public interface UserRepository extends JpaRepository<User, Integer> {

    UserDetails findByUsername(String username);

    User findByUsernameAndPassword(String username,String password);

    User findByApiKey(String apiKey);
}
